<?php
//---------------------------------------------------------------------------------------------------
    require_once('../config.inc.php');

    require_once($config['app_dir'] . '/classes/StockMailers.class.php');
    //-----------------------------------------------------------------------------------------------
    $tradeID = intval($argv[1]);
    $beginTime = intval($argv[2]);
    $type = intval($argv[3]);
    $system = intval($argv[4]);

    echo ' trade=' . $tradeID . ' ';
    echo ' befintime=' . $beginTime.' ';
    echo ' begintime=' . date('Y-m-d H:i:s', $beginTime).' ';
    echo ' type=' . $type.' ';
    echo ' system=' . $system.' ';

    try {
       	$Mailer = new objExportServiceProcess($tradeID, $beginTime, $type, $system);
       	$Mailer->Send();
    } catch(exception $e) {
        die('Error: '.$e->getMessage());
    }

//---------------------------------------------------------------------------------------------------
?>
